package com.api.sdk.request;

import com.api.sdk.ApiField;
import com.api.sdk.ApiMethod;
import com.api.sdk.ApiObject;
import com.api.sdk.ApiRequest;
import com.api.sdk.response.BaiduTranResponse;

import java.util.HashMap;

public class BaiduTranRequest implements ApiRequest<BaiduTranResponse> {
    private String apiVersion = "1.0";
    private HashMap<String, Object> headers;
    @ApiField
    private String from;
    @ApiField
    private String to;
    @ApiField
    private String query;
    private ApiObject model = null;

    public String getFrom() {
        return from;
    }

    public void setFrom(String from) {
        this.from = from;
    }

    public String getTo() {
        return to;
    }

    public void setTo(String to) {
        this.to = to;
    }

    public String getQuery() {
        return query;
    }

    public void setQuery(String query) {
        this.query = query;
    }


    @Override
    public String getApiMethodName() {
        return "api.baidu.transfer";
    }

    @Override
    public String getApiVersion() {
        return apiVersion;
    }

    @Override
    public void setApiVersion(String apiVersion) {
        this.apiVersion = apiVersion;
    }

    @Override
    public Class<BaiduTranResponse> getResponseClass() {
        return BaiduTranResponse.class;
    }

    @Override
    public ApiObject getModel() {
        return model;
    }

    @Override
    public void setModel(ApiObject model) {
        this.model = model;
    }

    @Override
    public String getUrl() {
        return "localhost:8080/api-interface/translation";
    }

    @Override
    public HashMap<String, Object> getHeaders() {
        return headers;
    }

    @Override
    public ApiMethod getMethod() {
        return ApiMethod.GET;
    }
}
